import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from 'axios'
import VueAxios from 'vue-axios'
import mavonEditor from 'mavon-editor';     //markdown编辑器
import 'mavon-editor/dist/css/index.css';


//解决axios跨域问题  
Vue.prototype.axios = axios //设置axios全局引用
axios.defaults.timeout = 5000;// 在超时前，所有请求都会等待 5 秒
// 配置请求头
axios.defaults.headers.post['Content-Type']='application/x-www-form-urlencoded;charset=UTF-8';
axios.defaults.baseURL = 'http://localhost:9081/blog_front/';// 配置接口地址
axios.defaults.withCredentials = true;

Vue.use(VueAxios,axios);
Vue.config.productionTip = false
Vue.use(mavonEditor);
Vue.use(ElementUI);

new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
